<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="a.header.jsp" %>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head> 
 <body>
 
 <div class="layui-inline">
      <label class="layui-form-label">开始日期</label>
      <div class="layui-input-inline">
        <input type="text" class="layui-input" id="test20">
      </div>
      
    </div>
 <div class="layui-inline">
	 <label class="layui-form-label">结束日期</label>
    	<div class="layui-input-inline">
     		 <input type="text" class="layui-input" id="test21">
    		</div>	
      </div>
<script>
layui.use(['laydate','layer'], function(){
  var laydate = layui.laydate;
  var layer = layui.layer;
  var $=layui.$;
  var t1=0;
  var t2=0;
  laydate.render({
    elem: '#test20'    
    ,type:'datetime'
    ,format:'yyyy-MM-dd HH:mm:ss'
    ,value:new Date()
    ,done: function(value, date){      
      console.log(value);
      console.log(date);
      var startdate=new Date(value).getTime();
      var enddate=new Date($("#test21").val()).getTime();
      console.log("开始日期值:"+startdate+"   结束日期值："+enddate);
    }
  });
  laydate.render({
	    elem: '#test21'    
	    ,type:'datetime'
	    ,format:'yyyy-MM-dd HH:mm:ss'
	    ,value:new Date((new Date()+1000*60*60*24))
	    ,done: function(value, date){
	      console.log(value);
	      console.log(new Date("2020-02-05 20:10:55"));
	    }
	  });
});
</script>
</body>

</html>